package com.linkeleee.core.exception;

import lombok.Getter;

@Getter
public class BizException extends RuntimeException {

    private int code = -1;

    private String desc;

    private Object data;

    public BizException() {
        super();
    }

    public BizException(String msg) {
        super(msg);
        this.desc = msg;
    }

    public BizException(int code, String msg) {
        super(msg);
        this.code = code;
        this.desc = msg;
    }

    public BizException(int code, String msg, String desc) {
        super(msg);
        this.code = code;
        this.desc = desc;
    }

    public BizException(int code, String msg, Object data) {
        super(msg);
        this.code = code;
        this.desc = msg;
        this.data = data;
    }

    public BizException(int code, String msg, Throwable e) {
        super(msg, e);
        this.code = code;
        this.desc = msg;
    }

}
